export default {
  increment(state) {
    state.counter++
  },
  decrement(state) {
    state.counter--
  },
  // incrementCount(state, count){
  //   state.counter += count
  // },
  incrementCount(state, payload){
    state.counter += payload.count
  },
  addStudent(state, stu){
    state.students.push(stu)
  },
  updateInfo(state) {
    state.info.name = 'kele'
    // 非响应式
    // state.info['address'] = '洛杉矶'
    // 响应式
    // Vue.set(state.info, 'address', '洛杉矶')

    // 非响应式
    // delete state.info.age
    // Vue.delete(state.info, 'age')
  }
}
